(function v1(){
    var el = $(".product-button02");
// The data/time we want to countdown to
var countDownDate = new Date("Nov 11, 2020 20:08:00").getTime();

// Run myfunc every second
var myfunc = setInterval(function () {

    var now = new Date().getTime();
    var timeleft = countDownDate - now;

    // Calculating the days, hours, minutes and seconds left
    var days = Math.floor(timeleft / (1000 * 60 * 60 * 24));
    var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
    var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60));
    var seconds = Math.floor((timeleft % (1000 * 60)) / 1000);

    // Result is output to the specific element
    console.log(days + "d " + hours + "h " + minutes + "m " + seconds + "s ");

    // Display the message when countdown is over
    if (timeleft < 0) {
        $(".product-button02").click();
    }
}, 1000);
})();


(function v3(){
    var el = $(".product-button02");
// The data/time we want to countdown to
var countDownDate = new Date("Nov 12, 2020 10:08:02").getTime();

// Run myfunc every second
var myfunc = setInterval(function() {

var now = new Date().getTime();
var timeleft = countDownDate - now;
    
// Calculating the days, hours, minutes and seconds left
var days = Math.floor(timeleft / (1000 * 60 * 60 * 24));
var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((timeleft % (1000 * 60)) / 1000);
    
// Result is output to the specific element
console.log(days + "d " + hours + "h " + minutes + "m " + seconds + "s "); 
    
// Display the message when countdown is over
if (timeleft < 500) {
    el.click();
}
}, 500);
})();


(function v4(){
    var el = $(".product-button02");
// The data/time we want to countdown to
var countDownDate = new Date("Nov 12, 2020 10:08:00").getTime();

// Run myfunc every second
var myfunc = setInterval(function() {

var now = new Date().getTime();
var timeleft = countDownDate - now;
    
// Calculating the days, hours, minutes and seconds left
var days = Math.floor(timeleft / (1000 * 60 * 60 * 24));
var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((timeleft % (1000 * 60)) / 1000);
    
// Result is output to the specific element
console.log(days + "d " + hours + "h " + minutes + "m " + seconds + "s "); 
    
// Display the message when countdown is over
if (timeleft < 500) {
    el.click();
}
}, 500);
})();

(function v5(){
    var el = $(".product-button02");
// The data/time we want to countdown to
var countDownDate = new Date("Nov 12, 2020 10:08:02").getTime();

// Run myfunc every second
var myfunc = setInterval(function() {

var now = new Date().getTime();
var timeleft = countDownDate - now;
    
// Calculating the days, hours, minutes and seconds left
var days = Math.floor(timeleft / (1000 * 60 * 60 * 24));
var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((timeleft % (1000 * 60)) / 1000);
    
// Result is output to the specific element
console.log(days + "d " + hours + "h " + minutes + "m " + seconds + "s "); 
    
// Display the message when countdown is over
if (timeleft < 200) {
    el.click();
}
}, 200);
})();

(function v6(){
    var el = $(".product-button02");
// The data/time we want to countdown to
var countDownDate = new Date("Nov 12, 2020 10:08:00").getTime();

// Run myfunc every second
var myfunc = setInterval(function() {

var now = new Date().getTime();
var timeleft = countDownDate - now;
    
// Calculating the days, hours, minutes and seconds left
var days = Math.floor(timeleft / (1000 * 60 * 60 * 24));
var hours = Math.floor((timeleft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((timeleft % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((timeleft % (1000 * 60)) / 1000);
    
// Result is output to the specific element
console.log(days + "d " + hours + "h " + minutes + "m " + seconds + "s "); 
    
// Display the message when countdown is over
if (timeleft < 200) {
    el.click();
}
}, 200);
})();
